* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    background-attachment: fixed;
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin: 20px 0;
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

h1 i {
    color: #f8c555;
}

.game-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
    background: rgba(25, 25, 35, 0.85);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.board-container {
    flex: 1;
    min-width: 540px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#chessboard {
    background: #e8c58c;
    border: 2px solid #5d4037;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.controls {
    width: 100%;
    margin-top: 20px;
    background: rgba(40, 40, 60, 0.8);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.difficulty-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

label {
    font-weight: bold;
    color: #f8c555;
}

select, button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

select {
    background: #2c3e50;
    color: #fff;
}

button {
    background: #e74c3c;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(1px);
}

.buttons {
    display: flex;
    gap: 15px;
}

.game-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-box, .move-history, .fen-display {
    background: rgba(40, 40, 60, 0.8);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

h3 {
    color: #f8c555;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
}

#game-status {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f8c555;
    min-height: 30px;
}

#move-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(20, 20, 30, 0.6);
    border-radius: 5px;
    font-family: monospace;
}

#fen-string {
    width: 100%;
    height: 100px;
    padding: 10px;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid #444;
    border-radius: 5px;
    color: #f8c555;
    font-family: monospace;
    resize: none;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    color: #aaa;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .game-container {
        flex-direction: column;
    }
    
    .board-container {
        min-width: 100%;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .buttons {
        justify-content: center;
    }
}
